﻿<%@ Page Language="C#" MasterPageFile="~/defaultLayout.master" AutoEventWireup="true" CodeFile="Account.aspx.cs" Inherits="Account" %>
<%@ MasterType  virtualPath="~/defaultLayout.master"%>
<asp:Content ID="maincontent" ContentPlaceHolderID="main" runat="server">
    

    <div class="content">
        <asp:Label ID="lblMessage" runat="server" />
        <div class="accountBlock left">
            <h1 class="accountTitle left">Accountgegevens </h1>
            <p class="accountEditHeader">&nbsp;<%--[<asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl="#change password">wijzig</asp:HyperLink>]--%></p>
            
            <h4 class="accountHeader">Gebruikersnaam</h4>
			<p class="accountData">
				<asp:Label ID="lblUserName" runat="server" Text="Label"></asp:Label>
            </p>

            <h4 class="accountHeader">Wachtwoord</h4>
            <p class="accountData">
                <asp:Label ID="lblPassword" runat="server" Text="****"></asp:Label>
            </p>

            <%--<h4 class="accountHeader">Security Question</h4>
            <p class="accountData">
                <asp:Label ID="lblQuestion" runat="server" Text="Label"></asp:Label>
               [<asp:LinkButton ID="lnkEditSecurityq" runat="server" NavigateUrl="#change password">wijzig</asp:LinkButton>]
            </p>--%>

            <h4 class="accountHeader">E-mail</h4>
            <p class="accountData">
                <asp:Label ID="lblEMail" runat="server" Text="Label"></asp:Label>
                <asp:TextBox id="emailTxt" Visible="false" runat="server"></asp:TextBox>
                   [<asp:LinkButton ID="lnkEditEmail" runat="server" Onclick="lnkEditEmail_Click">wijzig</asp:LinkButton>]
            </p>

            <h4 class="accountHeader">Taal</h4>
            <p class="accountData">
                <asp:Label ID="lblLanguage" runat="server" Text="Label"></asp:Label>
                <asp:DropDownList ID="ddlLanguage" runat="server"></asp:DropDownList>   
                [<asp:LinkButton ID="lnkEditLanguage" runat="server" OnClick="lnkEditLanguage_Click">wijzig</asp:LinkButton>]
            </p>

            <h4 class="accountHeader">Abonnement</h4>
            <p class="accountData">
                <asp:Label ID="lblSubscription" runat="server" Text="Label"></asp:Label>
            </p>

            <h4 class="accountHeader">Maandelijkse nieuwsletter</h4>
            <p class="accountData"><asp:Label ID="lblNewsletter" runat="server" Text="Label"></asp:Label>
                <asp:CheckBox ID="cbNewsletter" runat="server" Visible="false" Checked="true" />
                [<asp:LinkButton ID="lnkEditLetter" runat="server" OnClick="lnkEditLetter_Click">wijzig</asp:LinkButton>]
            </p>

        </div>
        <div class="accountBlock left padding-left">
            <h1 class="accountTitle left">Persoonlijke informatie</h1>
            <p class="accountEditHeader">&nbsp;</p>
                    
            <h4 class="accountHeader">Naam</h4>
            <p class="accountData"><asp:Label ID="lblName" runat="server" Text="Label"></asp:Label>
                <asp:TextBox id="nameTxt" Visible="false" runat="server"></asp:TextBox>
                <asp:TextBox id="tussenTxt" Visible="false" runat="server"></asp:TextBox>
                <asp:TextBox id="lastTxt" Visible="false" runat="server"></asp:TextBox>
                [<asp:LinkButton ID="lnkEditName" runat="server" OnClick="lnkEditName_Click" >wijzig</asp:LinkButton>]
            </p>

            <h4 class="accountHeader">Geboortedatum</h4>
            <p class="accountData"><asp:Label ID="lblDateOfBirth" runat="server" Text="Label"></asp:Label>
                <asp:TextBox ID="dateTxt" Visible="false" runat="server" TextMode="Date" />
                [<asp:LinkButton ID="lnkEditBirth" runat="server" OnClick="lnkEditBirth_Click">wijzig</asp:LinkButton>]
            </p>

            <h4 class="accountHeader">Adres</h4>
            <p class="accountData"><asp:Label ID="lblAddress" runat="server" Text="Label"></asp:Label>
                <asp:TextBox id="adresTxt" Visible="false" runat="server"></asp:TextBox>
                <asp:TextBox id="adresNrTxt" Visible="false" runat="server"></asp:TextBox>
                [<asp:LinkButton ID="lnkEditAdres" runat="server" OnClick="lnkEditAdres_Click">wijzig</asp:LinkButton>]
            </p>

            <h4 class="accountHeader">Postcode</h4>
            <p class="accountData"><asp:Label ID="lblPostal" runat="server" Text="Label"></asp:Label>
                <asp:TextBox id="postTxt" Visible="false" runat="server"></asp:TextBox>
                [<asp:LinkButton ID="lnkEditPostcode" runat="server" OnClick="lnkEditPostcode_Click">wijzig</asp:LinkButton>]
            </p>

            <h4 class="accountHeader">Geslacht</h4>
            <p class="accountData"><asp:Label ID="lblGender" runat="server" Text="Label"></asp:Label>
                <asp:DropDownList ID="sexDdl" runat="server"></asp:DropDownList>
                [<asp:LinkButton ID="lnkEditGender" runat="server" OnClick="lnkEditGender_Click">wijzig</asp:LinkButton>]
            </p>
        </div>


        <div class="reserveringsContainer left">
            <br />
            <h1 class="accountTitle underline">Reserveringen</h1>
            <asp:ListView ID="ListView1" runat="server">
                <LayoutTemplate>
                    <div class="reserveringenContainer" runat="server" id="groupPlaceholder">
                    </div>
                </LayoutTemplate>
                <EmptyDataTemplate>
                    <p class="accountData">
                        U heeft geen reserveringen staan.
                    </p>
                </EmptyDataTemplate>
                <GroupTemplate>

                    <div class="reserveringenContent" id="itemPlaceholder" runat="server">
                    </div>

                </GroupTemplate>
                <ItemTemplate>
                        <div class="reserveringsContent left">
                            <asp:Image ID="Image1" ImageUrl='<%# Eval("planning.film.url") %>' height="180px" runat="server" />
                            <br />
                            <h4 class="accountHeader textMiddle">
                            <%# Eval("planning.film.naam") %>
                            </h4>
                            <br />

                            
                            <div class="bottom">
                                <%# getCorrectDate(Eval("planning.datum"))%>
                                <br />
                                <%# Eval("planning.tijd") %>
                                <br />
                                <%# getTicketsStrings(Eval("bestelling_id")) %>
                                <asp:Button ID="btnDelete" runat="server" Text="Verwijder" CommandArgument='<%# Eval("bestelling_id") %>'/>
                            </div>
                        </div>
                        
                </ItemTemplate>
            </asp:ListView>
        </div>

    </div>

    <asp:EntityDataSource ID="dsAccount" runat="server" ConnectionString="name=debioscoopEntities" DefaultContainerName="debioscoopEntities" EnableFlattening="False" EntitySetName="accounts" EntityTypeFilter="account" Select="it.[voornaam], it.[tussenvoegsel], it.[geboortedatum], it.[achternaam], it.[straat], it.[huisnummer], it.[postcode], it.[geslacht], it.[taal], it.[nieuwsbrief], it.[abbonementabbonement_id]" Where="it.gebruikersnaam = @selGebruikersnaam" >
    </asp:EntityDataSource>
</asp:Content>